{% extends "account/base.html" %}

{% load i18n %}
{% load account %}
{% load widget_tweaks %}

{% block head_title %}{% trans "Confirm E-mail Address" %}{% endblock %}

{% block content %}
<div class="container">
  <div class="row justify-content-center">
    <div class="col-sm-11 col-md-10 col-lg-8">
      <div id="email-form" class="form-container">
    {% if confirmation %}
      <h2>{% trans "Confirm E-mail Address" %}</h2>
        <form method="post" action="{% url 'account_confirm_email' confirmation.key %}">
          <p>{% blocktrans with confirmation.email_address.email as email %}Please confirm you own <a href="mailto:{{ email }}">{{ email }}</a>.{% endblocktrans %}</p>
          {% csrf_token %}
          <button class="btn btn-primary btn-block" type="submit">{% trans 'Confirm' %}</button>
        </form>

      {% user_display confirmation.email_address.user as user_display %}

    {% else %}

    {% url 'account_email' as email_url %}

    <p>{% blocktrans %}This e-mail confirmation link expired or is invalid. Please <a href="{{ email_url }}">issue a new e-mail confirmation request</a>.{% endblocktrans %}</p>
    {% endif %}
      </div>
    </div>
  </div>
</div>
{% endblock %}
